<?php
$this->beginContent('//layouts/base');
?>

<div id="instant-notification" style="display: none;">
    <span class="inline-block"></span>
</div>
<?php if (PsSystemMessage::hasMessages()): ?>
	<div id="system-messages" class="">
		<?php PsSystemMessage::flash(); ?>
	</div>
<?php endif; ?>
<div class="container" id="page">
	<?php
	if (!Yii::app()->user->isGuest) {
		$this->renderPartial('//layouts/_minimenu');
	}
	?>
    <div class="clearfix" id="topbar">
		<?php $this->renderPartial('//layouts/_logo'); ?>
		<h1 class="app-title">Agency Portal</h1>
		<?php if (!Yii::app()->user->isGuest): ?>
			<?php $this->renderPartial('//layouts/_user_box'); ?>
		<?php endif; ?>
    </div>
    <div class="main_container container_16 clearfix">
		<?php $this->renderPartial('//layouts/_mainmenu'); ?>

        <div id="main-contents" class="clearfix">
			<?php echo $content; ?>
        </div>
    </div><!-- maincontainer -->

</div><!-- page -->
<div id="footer" class="container align-center">
	<?php if (!(Yii::app()->user->checkModuleAccess('Propsage.WhiteLabel'))): ?>
		<p>
			&copy;<?php echo date('Y'); ?> PropSage - 
			<a href="/terms.html">Terms of Use</a>&nbsp;|&nbsp;
			<a href="/privacy.html">Privacy</a>&nbsp;|&nbsp;
			<a href="/aboutus.html">About Us</a>
		</p>
		<p class="powered-by">Powered by <img src="/images/logo_propsage_50x26.png" width="50" height="26" /></p>
			<?php if (YII_DEBUG_PROFILING == true): ?>
				<?php $dbStats = Yii::app()->db->getStats(); ?>
		<p>Number of queries: <?php echo $dbStats[0]; ?></p>
		<p>Total query execution time: <?php echo $dbStats[1]; ?>s</p>
		<?php endif; ?>
	<?php endif; ?>
</div><!-- footer -->
<?php $this->endContent(); ?>